package com.growthsee.framework.config.wechat;

import com.alibaba.fastjson.JSONArray;
import lombok.Data;

import java.io.Serializable;

@Data
public class WxMpOAuth2AccessToken implements Serializable {
    private static final long serialVersionUID = -1345910558078620805L;
    private String accessToken;
    private int expiresIn = -1;
    private String refreshToken;
    private String openId;
    private String scope;
    private String unionId;

    public static WxMpOAuth2AccessToken fromJson(String json) {
        return JSONArray.parseObject(json, WxMpOAuth2AccessToken.class);
    }
}
